import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      component: () => import("@/views/layout/LayoutContainer.vue"),
      redirect: "/recommend",
      children: [
        // 推荐
        {
          path: "/recommend",
          component: () => import("@/views/recommend/RecommendContainer.vue"),
        },
        // 论坛
        {
          path: "/forum",
          component: () => import("@/views/forum/ForumContainer.vue"),
        },
        // 关于他
        {
          path: "/about",
          component: () => import("@/views/about/AboutPage.vue"),
        },
        // 个人信息
        {
          path: "/info",
          component: () => import("@/views/personal/PersonalInfo.vue"),
        },
      ],
    },
  ],
});

export default router;
